// 模拟请求
export const loginApi = (username, password) => new Promise((resolve) => {
  if (username == 'admin' && password == '123456') {
    resolve({
      code: '200',
      msg: '登陆成功',
      data: {
        userId: 1,
        token: 'nckjsncjkn'
      }
    })
  } else {
    resolve({
      code: '1001',
      msg: '账号或者密码错误'
    })
  }
})

export const logoutApi = () => new Promise((resolve) => {
  resolve({
    code: '200',
    msg: '退出成功'
  })
})